<%
// Required vars
// - id, the form ID
// - cwd, absolute path from which to begin browsing
// - placeholder, optional input field placeholder
// - pattern, optional input field pattern
// - label, optional defaults to 'Save'
// - Title, optional defaults to 'Browse'
%>

<form id='<%=obj.id%>' class='modal-body round browser col6 pin-top top1 bottom2 dark fill-dark'>
  <h4 class='pad1'><%=obj.title || 'Browse'%></h4>
  <div>
    <a href='#' class='quiet pad1 icon pin-topright close js-close'></a>
    <div class='with-icon text-right truncate contain keyline-top quiet js-cwd z1'>
      <input type='text' value='<%=cwd%>' disabled class='clean transparent col12 small js-printcwd'>
      <a href='#<%= obj.cwd.split('/').slice(0,-1).join('/') %>' class='js-cwd-back icon prev'></a>
    </div>
  </div>
  <div class='list js-list scroll-styled fill-darken1 pad1 pin-top bottom2 space-top8'></div>

  <div class='clearfix pad1x pad2y pin-bottom'>
    <div class='pill clearfix input-pill'><!--
      --><input type='hidden' name='cwd' value='<%=obj.cwd%>' /><!--
      --><input class='col8 small' title='<%=obj.hint||obj.placeholder||''%>' type='text' placeholder='<%=obj.placeholder||''%>' size='20' name='basename' pattern='<%=obj.pattern||''%>'/><!--
      --><input class='col4 button' type='submit' value='<%=obj.label||'Save'%>'/>
    </div>
  </div>
</form>
